//
//  ___FILENAME___
//  ___PROJECTNAME___
//
//  Created by ___FULLUSERNAME___ on ___DATE___.
//___COPYRIGHT___
//

#import "___FILEBASENAMEASIDENTIFIER___.h"
#import "RFResponse.h"

@implementation ___FILEBASENAMEASIDENTIFIER___

- (instancetype)init
{
    if (self = [super init]) {
        _addToken = YES;
    }
    return self;
}

- (void)willCreateURLRequest
{
    if (self.addToken) {
        NSString *token = nil; // TODO: [RFAppContext sharedInstance].token;
        if (token) {
            [self addGetParamValue:token forKey:@"token"];
        }
    }
    
    NSString *deviceId = [UIDevice currentDevice].identifierForVendor.UUIDString;
    if (deviceId.hasText) {
        [self addGetParamValue:deviceId forKey:@"device_id"];
    }
    [self addGetParamValue:@"ios" forKey:@"client"];
    
    NSString *version = [RFApplication sharedApplication].version;
    if (version.hasText) {
        [self addGetParamValue:version forKey:@"ver"];
    }
}

@end
